﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ViewMaker.Core.ViewModels;

namespace ViewMaker.Core.Views
{
    /// <summary>
    /// StatusFooterView.xaml の相互作用ロジック
    /// </summary>
    public partial class StatusFooterView : UserControl
    {
        public StatusFooterView()
        {
            InitializeComponent();
            this.Loaded += new RoutedEventHandler(StatusFooterView_Loaded);
        }

        void StatusFooterView_Loaded(object sender, RoutedEventArgs e)
        {

            Window.GetWindow(this).MouseDown += new MouseButtonEventHandler(StatusFooterView_MouseDown);
            Window.GetWindow(this).KeyDown += new KeyEventHandler(StatusFooterView_KeyDown);
        }

        void StatusFooterView_KeyDown(object sender, KeyEventArgs e)
        {
            ((StatusFooterViewModel)this.DataContext).Message = "";
        }

        void StatusFooterView_MouseDown(object sender, MouseButtonEventArgs e)
        {
            ((StatusFooterViewModel)this.DataContext).Message = "";
        }
    }
}
